import React, { Component } from 'react';

import '../../styles/leftnav.scss'

class Leftnav extends Component {
    constructor (props){
        super(props)
        this.state ={
            list:this.props.children
        }
    }
    render() {
        console.log(this.state.list);
        
        return (
            <div className='leftnav'>
                <h1 onClick={ () => { this.props.callback(this.state.list[0].id) } }>222</h1>
                <h2>231</h2>
                
            </div>
        );
    }
}

export default Leftnav;